package com.claire.ffmpegplayer.sdk;

import android.view.Surface;

public class FFmpeg {
    static {
        System.loadLibrary("avcodec-57");
        System.loadLibrary("avdevice-57");
        System.loadLibrary("avfilter-6");
        System.loadLibrary("avformat-57");
        System.loadLibrary("avutil-55");
        System.loadLibrary("postproc-54");
        System.loadLibrary("swresample-2");
        System.loadLibrary("swscale-4");
        System.loadLibrary("ffmpegplayer");
        System.loadLibrary("ffmpeg");
        System.out.println("加载库成功");
        player_Init();
    }
    public static native boolean player_Init();
    public static native boolean player_Release();
    public static native int player_OpenStream(String url);
    public static native boolean player_CloseStream(int channel);
    public static native boolean player_SetSuface(int channel, Surface surface);
    public static native boolean player_RegisterCallback(int channel,OnSubProgressListener listener);

    //回调到各个线程
    public interface OnSubProgressListener {
        public int onProgressChange(long total, long already);
    };

}
